package com.bbzn.device.client.service;

import com.bbzn.device.client.config.Constants;
import org.springframework.integration.annotation.MessagingGateway;
import org.springframework.integration.mqtt.support.MqttHeaders;
import org.springframework.messaging.handler.annotation.Header;
import org.springframework.stereotype.Component;

/**
 * @Author wulongbo
 * @Date 2021/07/03 15:25
 * @Version 1.0
 */

@MessagingGateway(defaultRequestChannel = Constants.MQTT_NB_PUBLISH_CHANNEL)
@Component
public interface NbPublishService {
    void sendToMqtt(String data, @Header(MqttHeaders.TOPIC) String topic);

    void sendToMqtt(String data);

    void sendToMqtt(String data, @Header(MqttHeaders.TOPIC) String topic, @Header(MqttHeaders.QOS)int qos);
}
